import {message} from "ant-design-vue";

/**
 * 复制文本
 * @param context
 */
export const copy = ( content ) => {
    const input = document.createElement('input')
    document.body.appendChild(input)
    input.setAttribute('value', content)
    input.select()
    if (document.execCommand('copy')) {
        document.execCommand('copy')
    }
    document.body.removeChild(input)
    message.success('复制成功!');
}